#include "comm.hpp"

int main()
{
    key_t key = getftok();

    int msqid = get_msqid(key);

    while (true)
    {
        char buf[Size]={0};

        /* int n = read(0, buf, sizeof buf);
        if (n < 0)
        {
            cerr << "client read error! eoorr:" << errno << " strerror:" << strerror(errno) << endl;
            exit(1);
        } */
        fflush(stdout);
        recive_msg(msqid,servers_type,buf);
        cout << "client# "<<buf<<endl;
       
       sleep(1);
        
    }
}